<template>
	<view class="content">
		<TabNavigation style="width: 100%;" :title="title"></TabNavigation>
		<card-box style="width: 100%;" :header="'统计信息'">
			<view slot="main" class="content-card-main">
				<view class="main_card main_card_b">
					<view class="card" v-for="(item,index) in card4ImgList" :key="index">
						<image :src="item.url"></image>
						<view class="title" style="left:40rpx;color: #363636;">
							{{item.title}}
						</view>
						<view class="bottom" :style="`left:40rpx;color: ${item.unitColor};`">
							<text :style="`color: ${item.color};`">
								{{item.number}}
							</text>
							{{item.unit}}
						</view>
					</view>
				</view>
			</view>
		</card-box>
		
		<card-box style="width: 100%;margin-bottom: 30rpx;" :header="'今日活动情况'">
			<view slot="main" class="content-card-main" style="padding-top: 0;">

				<view class="border_item" v-for="(item,index) in borderList1" :key="index">
					<view class="name">
						{{item.name}}
					</view>
					<view class="content" v-for="(ele,ex) in item.list" :key='ex' :style="ele.type==2?'width:100%':''">

						<view class="right">
							<view class="title">
								{{ele.label}}
							</view>
							<view class="son" :class="{son1:ele.style}">
								{{ele.content}}
							</view>
						</view>
					</view>
				</view>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>

		<card-box style="width: 100%;" :header="'每月活动排名'">
			<view slot="main" class="content-card-main" style="padding-top: 0;">
				<customBar :data="barList" :barStyle="barStyle" :sort="true"></customBar>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>
		<card-box style="width: 100%;" :header="'今年活动排名'">
			<view slot="main" class="content-card-main" style="padding-top: 0;">
				<customBar :data="barList1" :barStyle="barStyle1" :sort="true"></customBar>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>

		<card-box style="width: 100%;margin-bottom: 30rpx;" :header="'代表履职积分情况'" type='3'>
			<view slot="main" class="content-card-main" style="padding-top: 0;">

				<view class="border_item" v-for="(item,index) in borderList" :key="index">
					<view class="name">
						{{item.name}}
					</view>
					<view class="content" v-for="(ele,ex) in item.list" :key='ex' :style="ele.type==2?'width:100%':''">

						<view class="right">
							<view class="title">
								{{ele.label}}
							</view>
							<view class="son" :class="{son1:ele.style}">
								{{ele.content}}
							</view>
						</view>
					</view>
				</view>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>
		<card-box style="width: 100%;" :header="'2024履职电子档案'" type='3'>
			<view slot="main" class="content-card-main">

				<c-table :headerData="headerData" :tableData="tableData">
					<template v-slot:unitName="{data}">
						<view class="font unitName">
							{{data.unitName}}
						</view>
					</template>
					<template v-slot:rzrs="{data}">
						<view class="font controls" @click="lookView">
							{{data.rzrs}}
						</view>
					</template>
				</c-table>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>
	</view>



</template>

<script>
	import TabNavigation from '@/components/TabNavigation.vue'
	import cardbox from '@/components/card/cardbox.vue'
	import cTable from '@/components/cTable/cTable.vue'
	import wordCloud from '@/components/wordCloud.vue'
	import customBar from '@/components/customBar.vue'
	export default {
		components: {
			TabNavigation,
			wordCloud,
			customBar,
			"card-box": cardbox,
			"c-table": cTable
		},
		data() {
			return {
				single: '',
				endSingle: '',
				header: "统计信息",
				title: '人大代表随手拍工作视窗',
				borderList: [{
					name: '黄海洋',
					list: [{
							label: '所属代表团：',
							content: '越秀代表团',
						},
						{
							label: '所属代表团排名：',
							content: '1',
							style: true
						},
						{
							label: '履职积分：',
							content: '306',
							style: true
						},
						{
							label: '总排名：',
							content: '1',
							style: true
						},
						{
							label: '更新时间：',
							content: '2024-12-29 22:25:09',
							type: 2,
						}
					]
				}, {
					name: '黄海洋',
					list: [{
							label: '所属代表团：',
							content: '越秀代表团',
						},
						{
							label: '所属代表团排名：',
							content: '1',
							style: true
						},
						{
							label: '履职积分：',
							content: '306',
							style: true
						},
						{
							label: '总排名：',
							content: '1',
							style: true
						},
						{
							label: '更新时间：',
							content: '2024-12-29 22:25:09',
							type: 2,
						}
					]
				}, {
					name: '黄海洋',
					list: [{
							label: '所属代表团：',
							content: '越秀代表团',
						},
						{
							label: '所属代表团排名：',
							content: '1',
							style: true
						},
						{
							label: '履职积分：',
							content: '306',
							style: true
						},
						{
							label: '总排名：',
							content: '1',
							style: true
						},
						{
							label: '更新时间：',
							content: '2024-12-29 22:25:09',
							type: 2,
						}
					]
				}],
				borderList1: [{
					name: '执法检查活动',
					list: [{
						label: '组织单位：',
						content: '市人大法工委',
						type: 2,
					}, {
						label: '参与人数：：',
						type: 2,
						content: '306  人',
						style: true
					}, ]
				}, {
					name: '组织培训学习',
					list: [{
						label: '组织单位：',
						content: '市人大法工委',
						type: 2,
					}, {
						label: '参与人数：：',
						type: 2,
						content: '306  人',
						style: true
					}, ]
				}, {
					name: '关于电动自行车调研活动会议',
					list: [{
						label: '组织单位：',
						content: '市人大法工委',
						type: 2,
					}, {
						label: '参与人数：：',
						type: 2,
						content: '306  人',
						style: true
					}, ]
				}],

				doubleSpellingBarList: [{
						month: '01月',
						red: 13,
						right: 56
					},
					{
						month: '02月',
						red: 33,
						right: 23
					},
					{
						month: '03月',
						red: 13,
					}
				],
				headerData: [{
						width: 30,
						align: 'left',
						name: '代表姓名',
						value: 'unitName',
						solt: 'unitName'
					},
					{
						width: 20,
						align: 'left',
						name: '操作',
						value: 'rzrs',
						solt: 'rzrs'
					},

				],
				tableData: [{
						unitName: '钱乐惜',
						rzrs: '查看详情',
					},
					{
						unitName: '钱乐惜',
						rzrs: '查看详情',
					},
					{
						unitName: '钱乐惜',
						rzrs: '查看详情',
					},
					{
						unitName: '钱乐惜',
						rzrs: '查看详情',
					},
				],

				cardImgList: [{
						url: '/static/cd0537ec1.png',
						title: '满意',
						number: 72,
						unit: '%'
					},
					{
						url: '/static/cd0537ec2.png',
						title: '基本满意',
						number: 72,
						unit: '%'
					},
					{
						url: '/static/cd0537ec3.png',
						title: '不满意',
						number: 72,
						unit: '%'
					}
				],
				card2ImgList: [{
						url: '/static/ct35r2r.png',
						title: '办结数量',
						number: 1937,
						unit: '',
						color: '#B74B13',
						unitColor: "#DA8254"
					},
					{
						url: '/static/ct35r1r.png',
						title: '未办结',
						number: 16,
						unit: '',
						color: '#21B626',
						unitColor: "#21B626"
					},
				],
				card4ImgList: [{
						url: '/static/ct35r2r.png',
						title: '全年活动次数',
						number: 1937,
						unit: '次',
						color: '#B74B13',
						unitColor: "#DA8254"
					},
					{
						url: '/static/ct35r1r.png',
						title: '本月活动次数',
						number: 16,
						unit: '次',
						color: '#21B626',
						unitColor: "#21B626"
					},
					{
						url: '/static/ct35r3r.png',
						title: '全年代表参与人数',
						number: 1297,
						unit: '人',
						color: '#A57504',
						unitColor: "#A57504"
					},

					{
						url: '/static/ct35r4r.png',
						title: '本月代表参与人数',
						number: 12,
						unit: '人',
						color: '#F17666',
						unitColor: " #F17666"
					}
				],
				// 词云图数据
				wordCloud: [{
						name: "城建环资类(75)",
						value: 75,
					},
					{
						name: "法制类(4)",
						value: 4,
					},
					{
						name: "其他类(4)",
						value: 4,
					},
					{
						name: "预算类(32)",
						value: 32,
					},
					{
						name: "农村农业类(2)",
						value: 2,
					},
					{
						name: "社会建设类(35)",
						value: 35,
					},
					{
						name: "监察司法类(75)",
						value: 75,
					},
					{
						name: "经济类(4)",
						value: 4,
					},
					{
						name: "预算类(35)",
						value: 35,
					},
					{
						name: "经济类(2)",
						value: 2,
					},
					{
						name: "教科文卫类(2)",
						value: 2,
					},
					{
						name: "体育类(4)",
						value: 4,
					},
					{
						name: "经济类(32)",
						value: 32,
					},
					{
						name: "经济类(55)",
						value: 55,
					},
					{
						name: "监察司法类(55)",
						value: 55,
					},
					{
						name: "城建环资类(75)",
						value: 75,
					},
					{
						name: "教课文卫类(92)",
						value: 92,
					},
					{
						name: "其他类(35)",
						value: 35,
					},
					{
						name: "侨务类(4)",
						value: 4,
					},
				],
				barStyle: {
					color: '#F22C1F',
					background: 'linear-gradient(311deg, #FF1010 0%, #FFD3D3 100%);'

				},
				barList: [{

					name: '天河区',
					value: 66,
				}, {

					name: '黄埔区',
					value: 56,
				}, {

					name: '海珠区',
					value: 47,
				}],

				barStyle1: {
					color: ' #FF5900',
					background: 'linear-gradient(311deg, #FF7410 0%, #FFD3D3 100%);'

				},
				barList1: [{

					name: '天河区',
					value: 66,
				}, {

					name: '黄埔区',
					value: 56,
				}, {

					name: '海珠区',
					value: 47,
				}]
			}
		},
		onLoad() {

		},
		methods: {
			maskClick(e) {
				console.log('maskClick事件:', e);
			}
		}
	}
</script>

<style scoped lang="scss">
	.header {
		display: flex;
		align-items: center;
		justify-content: space-between;

		.title {
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #000000;
			line-height: 33rpx;
			text-align: center;
			font-style: normal;
			text-transform: none;
			display: flex;
			align-items: center;

			image {
				width: 90rpx;
				height: 84rpx;
				margin-left: -9rpx;
			}

			text {
				margin-top: 4rpx;
			}
		}


		.header-right {
			position: relative;
			width: 234rpx;
			height: 52rpx;

			.img {
				width: 234rpx;
				height: 52rpx;
			}

			text {
				font-family: DIN, DIN;
				font-weight: 500;
				font-size: 28rpx;
				color: #FFFFFF;
				position: absolute;
				top: 50%;
				right: 20rpx;
				transform: translateY(-50%);
			}
		}

		.header-right1 {
			position: relative;
			width: 236rpx;
			height: 52rpx;

			.img {
				width: 234rpx;
				height: 52rpx;
			}

			text {
				font-family: DIN, DIN;
				font-weight: 500;
				font-size: 28rpx;
				color: #FFFFFF;
				position: absolute;
				top: 50%;
				right: 20rpx;
				transform: translateY(-50%);
			}

		}

	}

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		// background: #F6F6F6;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.content-card-main {
		padding: 26rpx 32rpx 32rpx 28rpx;

		.line {
			width: 100%;
			height: 12rpx;
			border-radius: 6rpx;
			background-color: #F5F7F9;
			margin: 46rpx 0 34rpx;
		}


		.markers {
			display: flex;
			flex-direction: row;
			justify-content: start;

			.markers_item {
				display: flex;
				flex-direction: row;

				.left {
					width: 32rpx;
					height: 32rpx;
					background: linear-gradient(360deg, #8DC1FF 0%, #2A8BFD 100%), #FF928A;
					border-radius: 0rpx 0rpx 0rpx 0rpx;
				}

				.left_b {
					background: linear-gradient(180deg, #FF1010 0%, #FFD3D3 100%), #FFD982;
				}

				.right {
					margin-left: 18rpx;
					margin-right: 16rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #4C4C4C;
					line-height: 28rpx;
					text-align: center;
					font-style: normal;
					text-transform: none;
				}
			}
		}

		.double_warp {
			display: flex;
			flex-direction: column;

			.header {
				margin: 26rpx 0 12rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 26rpx;
				color: #000000;
				line-height: 30rpx;
				text-align: left;
				font-style: normal;
				text-transform: none;
			}

			.double_spellingBar {
				display: flex;
				flex-direction: row;

				.blueBar {
					height: 29rpx;
					width: 250rpx;
					background: linear-gradient(311deg, #2A8BFD 0%, #8DC1FF 100%);
					border-radius: 4rpx 4rpx 4rpx 4rpx;
					text-align: center;
					font-size: 24rpx;
					color: #FFFFFF;
				}

				.redBar {
					height: 29rpx;
					width: 293rpx;
					background: linear-gradient(311deg, #FF1010 0%, #FFD3D3 100%);
					border-radius: 4rpx 4rpx 4rpx 4rpx;
					text-align: center;
					font-size: 24rpx;
					color: #FFFFFF;
				}
			}
		}

		.border_item {
			margin-top: 34rpx;
			position: relative;
			background: #FFFFFF;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			border: 2rpx solid #EDEDED;
			padding: 30rpx 22rpx 24rpx;

			.name {
				position: absolute;
				padding: 8rpx 20rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 600;
				font-size: 24rpx;
				color: #FFFFFF;
				top: -26rpx;
				left: 20rpx;
				background: linear-gradient(135deg, #DF2F2F 0%, #FF8180 100%), linear-gradient(135deg, #FF0000 0%, #C70100 100%);
				border-radius: 4rpx 4rpx 4rpx 4rpx;
			}

			.content {
				display: flex;
				flex-direction: row;
				justify-content: start;
				position: relative;
				width: 49%;
				display: inline-block;

				.right {
					margin-top: 30rpx;
					margin-left: 28rpx;
					display: flex;
					flex-direction: row;

					.title {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #152C07;
						line-height: 28rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}

					.son {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #000000;
						line-height: 28rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}

					.son1 {
						font-family: DIN-BoldItalic, DIN-BoldItalic;
						font-weight: 400;
						font-size: 28rpx;
						color: #DF2F2F;
						line-height: 33rpx;
						text-align: center;
						font-style: normal;
						text-transform: none;
					}
				}

			}

		}
	}

	.content-card-main .main_card {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.content-card-main .main_card_b {
		display: flex;
		flex-wrap: wrap;
	}

	.content-card-main .main_card .card {
		position: relative;
	}


	.content-card-main .main_card_b .card {
		flex: 0 0 auto;
		/* 或者根据需要设置具体的宽度 */
		position: relative;
	}

	.content-card-main .main_card .card .title {
		position: absolute;
		top: 26rpx;
		left: 28rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #7F7F7F;
		line-height: 28rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card .bottom {
		position: absolute;
		top: 72rpx;
		left: 28rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #7F7F7F;
		line-height: 28rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card .bottom text {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 40rpx;
		color: #000000;
		line-height: 47rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card image {
		width: 204rpx;
		height: 148rpx;
	}

	.content-card-main .main_card_b .card image {
		width: 308rpx;
		height: 160rpx;
	}

	.content-card-main .main_banner {
		position: relative;
	}

	.content-card-main .main_banner image {
		margin-left: -12rpx;
		width: calc(100% + 20rpx);
		height: 161rpx;
	}

	.content-card-main .main_banner .number {
		position: absolute;
		font-family: DIN, DIN;
		top: 54rpx;
		right: 174rpx;
		font-weight: 500;
		font-size: 40rpx;
		color: #ffffff;
		line-height: 47rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}


	.font {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		font-style: normal;
		text-transform: none;
	}

	.unitName {
		width: 362rpx;
		color: #000000;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
		/* 保持内容在一行显示，如果需要多行，可以移除这行 */
	}

	.statistics {
		width: 100rpx;
		color: #2A8BFD;
	}

	.controls {
		width: 100rpx;
		color: #2A8BFD;
	}

	.indexThree {
		width: 200rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
	}

	.index {
		width: 50rpx;

	}

	.indext {
		width: 100rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
	}

	.index4 {
		width: 100rpx;
	}

	.table_footer {
		margin-top: 26rpx;
		text-align: center;
		width: 100%;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #2A8BFD;
		line-height: 28rpx;
		font-style: normal;
		text-transform: none;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}

	.triangle {
		margin-left: 6rpx;
		width: 0;
		height: 0;
		border-left: 9rpx solid transparent;
		/* 左侧透明 */
		border-right: 9rpx solid transparent;
		/* 右侧透明 */
		border-top: 12rpx solid #2A8BFD;
		/* 上侧为实心颜色 */
	}

	.wordCloud-warp_main {
		/* 	width: 652rpx;
		height: 384rpx; */
		background: #FFFFFF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		border: 2rpx solid #E8E8E8;
	}
</style>